import { createRegisterConfig } from '../utils/registerComponentTool'


const component = require.context(`../dragComponents`, true, /.*\/index\.js?$/)
export let registerComponent = createRegisterConfig()

component.keys().forEach((key) => {
  const config = component(key).default
  if (config && config.key) {
    registerComponent.register(config)
  }
})